package com.example.demo.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @ClassName ProxyHandler
 * @Description TODO
 * @Author hly
 * @Date 2018\11\26 0026 14:24
 */
public class ProxyHandler implements InvocationHandler {

    private Object obj;

    public ProxyHandler(Object obj){
        this.obj = obj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(obj,args);
    }
}
